package jsyf.oa.entity.contract;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

/**
 * Created by Administrator on 2018/9/25 0025.
 */
@Entity
@Table(name = "t_con_history_user", schema = "oa", catalog = "")
public class ContractHistoryEntity extends BaseEntity {
    private String mainId;
    private String historyManagerId;
    private String historyManagerName;
    private Integer sortNo;
    private Integer type;
    private String entryDate;
    private String leaveDate;

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getHistoryManagerId() {
        return historyManagerId;
    }

    public void setHistoryManagerId(String historyManagerId) {
        this.historyManagerId = historyManagerId;
    }

    public String getHistoryManagerName() {
        return historyManagerName;
    }

    public void setHistoryManagerName(String historyManagerName) {
        this.historyManagerName = historyManagerName;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getEntryDate() {
        return entryDate;
    }

    public void setEntryDate(String entryDate) {
        this.entryDate = entryDate;
    }

    public String getLeaveDate() {
        return leaveDate;
    }

    public void setLeaveDate(String leaveDate) {
        this.leaveDate = leaveDate;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("MAIN_ID", getMainId());
        obj.put("HISTORY_MANAGER_ID", getHistoryManagerId());
        obj.put("HISTORY_MANAGER_NAME", getHistoryManagerName());
        obj.put("SORT_NO", getSortNo());
        obj.put("TYPE", getType());
        obj.put("ENTRY_DATE", getEntryDate());
        obj.put("LEAVE_DATE", getLeaveDate());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_con_history_user";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("MAIN_ID", "mainId");
        obj.put("HISTORY_MANAGER_ID", "historyManagerId");
        obj.put("HISTORY_MANAGER_NAME", "historyManagerName");
        obj.put("SORT_NO", "sortNo");
        obj.put("TYPE", "type");
        obj.put("ENTRY_DATE", "entryDate");
        obj.put("LEAVE_DATE", "leaveDate");
        return obj;
    }

}
